package com.meme.util;

import java.util.Vector;
import java.util.Hashtable;

public class LinkedHashtable <KeyType, ValueType> extends Hashtable <KeyType, ValueType>
{
	Vector <KeyType> mList = new Vector <KeyType> ();
	
	public ValueType put (KeyType key, ValueType value)
	{
		
		if (super.get(key) != null)
			mList.remove (key);
		
		mList.add (key);
		return super.put (key, value);
	}
	
	
	public KeyType getKey (int index)
	{
		return mList.get(index);
	}
	
	public ValueType getValue (int index)
	{
		return this.get(mList.get(index));
	}
}
